Encrypting Passwords TomEE (tomee.xml)
It’s a good practice to encrypt the database passwords in tomee.xml. This is taken care of during the run time of the container.
Please remove the value of “DSACPASSWORD” from ac_env.dat once the container is up and running.
The Dockerfiles directory structure is as follows:
Under the scripts home directory,
Note: Place the AdminConsole build artifact which is downloaded from the Oracle Software Delivery Cloud in the externallibs/zip directory. Check the below snippet for your reference.
Under the externallibs directory.
From the Dockerfile location, execute the below command (a sample build.sh file is placed for reference)
docker build format:
$ docker build --network=host -t <Image_Name>:<Image_Tag> . --build-arg AC_PKG="<AC Package Name>"
docker build example:
$ docker build --network=host -t ac_tomee:12.2.0.0 . --build-arg AC_PKG="AdminConsole-tomEE-distribution.zip"
To start the containerized Admin Console application, run
docker run format:
$ docker run -itd --network=host --privileged -v /path/to/the/externallibs: /usr/local/tomee/externallibs --env-file /path/to/the/ac_env.dat -p <App_External_Port>:<App_Container_Port> --name <Container_Name> --hostname localhost <Image_Name>:<Image_Tag> createServer.sh $DB_TYPE
docker run example:
For ORACLE:
$ docker run -itd --restart unless-stopped --network=host --privileged -v /path/to/externallibs:/usr/local/tomee/externallibs/ --env-file /home/tomee/adminconsole/ac_env.dat -p 6060:6060 --name ac_tomee --hostname localhost ac_tomee:12.2.0.0 createServer.sh ORACLE
For DB2:
$ docker run -itd --restart unless-stopped --network=host --privileged -v /path/to/externallibs:/usr/local/tomee/externallibs/ --env-file /home/tomee/adminconsole/ac_env.dat -p 6060:6060 --name ac_tomee --hostname localhost ac_tomee:12.2.0.0 createServer.sh DB2
For MSSQL:
$ docker run -itd --restart unless-stopped --network=host --privileged -v /path/to/externallibs:/usr/local/tomee/externallibs/ --env-file /home/tomee/adminconsole/ac_env.dat -p 6060:6060 --name ac_tomee --hostname localhost ac_tomee:12.2.0.0 createServer.sh MSSQL
Ensure you to define the Database names as below only (Case Sensitive)
-
Oracle Database: ORACLE
-
DB2 Database: DB2
-
SQL Database: MSSQL
Check the docker logs in the PUTTY console by executing the below command:
$ docker logs -f ac_tomee
Access the application when you see the Server startup in [xxxxxx] milliseconds message in the PUTTY console.
Admin Console URL
Admin Console Home Page